package com.example.threadlocal;

public class Test {

    private static InheritableThreadLocal<String> contextq = new InheritableThreadLocal<>();

    public static void main(String[] args) {
        contextq.set("ee");
        Thread thread = new Thread(){
            @Override
            public void run() {
                contextq.set("hht");
                System.out.println(contextq.get());
            }
        };
        Thread thread2 = new Thread(){
            @Override
            public void run() {
                System.out.println(contextq.get());
            }
        };
        thread2.start();
        thread.start();
    }
}
